import request from '@/utils/request'
import axios from 'axios'

export function policy () {
  return new Promise((resolve) => {
    return request({
      url: '/mall/oss/getPolicy',
      method: 'get',
      params: {}
    }).then( res => {
      resolve(res.data);
    })
  })
}
axios.defaults.headers['content-type'] = 'application/x-www-form-urlencoded'
export function uploadFile(url,params) {
  return axios.post(url,params)
}

